package fr.xebia.service.impl;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.List;

import javax.ejb.EJBException;
import javax.ejb.EJBHome;
import javax.ejb.EJBObject;
import javax.ejb.Handle;
import javax.ejb.RemoveException;
import javax.ejb.SessionContext;

import org.hibernate.Hibernate;

import fr.xebia.data.Adresse;
import fr.xebia.service.AdresseService;
import fr.xebia.service.ServiceException;

/**
 * Service pour l'objet Adresse qui permet d'effectuer les actions standards
 * (save, update, get, list, search, delete)
 */
public class AdresseServiceImpl extends GenericService<Adresse> implements AdresseService {

	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public AdresseServiceImpl() {
		super();
	}

	@Override
	public int getMaxResults() {
		return super.getMaxResults();
	}

	@Override
	public Adresse get(Serializable id, boolean initializeChildren) throws ServiceException {
		return super.get(id, initializeChildren);
	}

	@Override
	public Adresse get(Serializable id) throws ServiceException {
		return super.get(id);
	}

	@Override
	public Serializable save(Adresse object) throws ServiceException {
		return super.save(object);
	}

	@Override
	public List<Serializable> save(List<Adresse> listeObject) throws ServiceException {
		// TODO Auto-generated method stub
		return super.save(listeObject);
	}

	@Override
	public void update(Adresse object) throws ServiceException {
		// TODO Auto-generated method stub
		super.update(object);
	}

	@Override
	public void update(List<Adresse> objects) throws ServiceException {
		// TODO Auto-generated method stub
		super.update(objects);
	}

	@Override
	public void delete(Adresse object) throws ServiceException {
		super.delete(object);
	}

	@Override
	public void delete(List<Adresse> objects) throws ServiceException {
		super.delete(objects);
	}

	@Override
	public void deleteById(List<? extends Serializable> listeObject) throws ServiceException {
		super.deleteById(listeObject);
	}

	@Override
	public void deleteById(Serializable id) throws ServiceException {
		super.deleteById(id);
	}

	@Override
	public List<Adresse> list() throws ServiceException {
		return super.list();
	}

	@Override
	public List<Adresse> list(boolean isChildrenInitialized) throws ServiceException {
		return super.list(isChildrenInitialized);
	}

	@Override
	public List<Adresse> search(Adresse exampleEntity) throws ServiceException {
		// TODO Auto-generated method stub
		return super.search(exampleEntity);
	}

	/**
	 * @see org.xebia.service.spring.GenericService#getObjectClass()
	 */
	@Override
	protected Class<Adresse> getObjectClass() {
		return Adresse.class;
	}

	@Override
	protected void initializeChildren(Adresse object) {
		Hibernate.initialize(object.getClient());
	}

	public void setSessionContext(SessionContext arg0) throws EJBException,
			RemoteException {
	}
	
	public void ejbCreate() throws EJBException {
	}

	public void ejbActivate() throws EJBException {
	}

	public void ejbPassivate() throws EJBException {
	}

	public void ejbRemove() throws EJBException {
	}

	public EJBHome getEJBHome() {
		return null;
	}

	public Handle getHandle() {
		return null;
	}

	public Object getPrimaryKey() {
		return null;
	}

	public boolean isIdentical(EJBObject otherEjbObject) {
		return (this == otherEjbObject);
	}

	public void remove() throws RemoveException {
	}
}
